import request from '@/common/request.js';

// 课程全部列表
export function listCourseAll() {
	return request({
		url: '/api/sc/course/list/select',
	})
}

//排课
// 按周获取课表
export function getWeekClassApi(params) {
	// pageNum=1&pageSize=10
	return request({
		url: '/api/sc/cla/time/list/searchListForCalendar',
		data: params
	})
}

//查询时间段内排课
export function getClaTimeByRangeApi(params) {
	return request({
		url: '/api/sc/cla/time/list/searchRecentDayTimeList',
		data: params,
	})
}

// 获取课程信息byid
export function getCourseInfoByIdApi(courseId) {
	// pageNum=1&pageSize=10
	return request({
		url: `api/sc/cla/time/info/detailById/${courseId}`,
	})
}

// 开课
export function newClaRecordApi(params) {
	return request({
		url: '/api/classRecord/add',
		method: 'POST',
		data: params
	})
}

// 修改签到状态：已签到
export function updateStuRecordApi(params) {
	return request({
		url: '/api/studentRecord/signin',
		method: 'PUT',
		data: params
	})
}

//查询学生签到记录列表
export function getStuRecordApi(params) {
	return request({
		url: '/api/studentRecord/pageList',
		data: params,
	})
}

//查询本人签到情况
export function getStuRecordOneApi(params) {
	return request({
		url: '/api/studentRecord/selectOne',
		data: params,
	})
}

